package src.main.java.org.collection.map;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;

public class Test {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<>();
        map.put("手表",100);
        map.put("手表",100);
        map.put("手机",2);
        map.put("Java",2);
        map.put(null,null);
        System.out.println(map);

        Map<String,Integer> linkedHashMap = new LinkedHashMap<>();
        linkedHashMap.put("手表",100);
        linkedHashMap.put("手表",100);
        linkedHashMap.put("手机",2);
        linkedHashMap.put("Java",2);
        linkedHashMap.put(null,null);
        System.out.println(linkedHashMap);

        Map<Integer,String> treeMap = new TreeMap<>();
        treeMap.put(1,"手机");
        treeMap.put(2,"JAVA");
        treeMap.put(5,"MySql");
        System.out.println(treeMap);
    }
}
